angular.module('RDApp',[])

.controller('MainController', ['$scope', '$http', '$location', '$compile', function ($scope, $http, $location, $compile) {
    $scope.openSecondary = function (event) {
        e = event || window.event;
        $(e.currentTarget).find('.secondary').addClass('secondaryActive');
    }
    $scope.closeSecondary = function (event) {
        e = event || window.event;
        $(event.currentTarget).find('.secondary').removeClass('secondaryActive');
    }
} ])
.controller('HomeController', ['$scope', '$http', '$location', '$compile', function ($scope, $http, $location, $compile) {
    var widthSlider = $('.slideshow img').width();
    (function ($) {
        setInterval(function () {
            $(".slideshow ul li:first-child").animate({ "margin-left": -widthSlider }, 1600, function () {
                $(this).css("margin-left", 0).appendTo(".slideshow ul");
            });
        }, 5000);
    })(jQuery);


} ])
.controller('ReservedController', ['$scope', '$http', '$location', '$compile', function ($scope, $http, $location, $compile) {

} ]);
